import { createRouter, createWebHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';

const defaultRoutes: RouteRecordRaw[] = [
  {
    path: "/",
    redirect: "/chat",
    children: [
      {
        path: "/chat",
        component: () => import("@/pages/chat/index.vue"),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes: defaultRoutes,
  scrollBehavior() {
    return {
      el: '#app',
      top: 0,
      behavior: 'smooth',
    };
  },
});

export default router;
